﻿using System;
using System.Collections.Generic;
using Redmine.Laptop.Common.Constants;
using Redmine.Laptop.Reports.Factories.ReportFactories;
using Redmine.Laptop.Reports.ReportParameters;

namespace Redmine.Laptop.Reports.ReportBuilders
{
    internal class EmploymentRatesReportBuilder : ReportBuilder
    {
        public EmploymentRatesReportBuilder(IReportFactory reportFactory)
            : base(reportFactory)
        {}

        protected override Parameters PrepareParameters(Dictionary<string, object> arguments)
        {
            return new EmploymentRatesReportParameters
                       {
                           FromDate = DateTime.Parse(arguments[Constant.ArgKeys.From].ToString()),
                           ThruDate = DateTime.Parse(arguments[Constant.ArgKeys.To].ToString())
                       };
        }
    }
}
